Skip to content

feat: add CUDA Samples compatibility testing - #51

Open
baominghelly wants to merge 2 commits into
masterfrom
compatibility_adapter_only
Open

feat: add CUDA Samples compatibility testing#51
baominghelly wants to merge 2 commits into
masterfrom
compatibility_adapter_only

Conversation

@baominghelly

@baominghelly baominghelly commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a compatibility adapter that builds and runs selected CUDA Samples
  • reuse the shared hardware platform layer for platform aliases, compiler discovery, and device visibility
  • support CUDA, MetaX, and CoreX build configuration without adding framework-specific Megatron, vLLM, or InfiniLM paths
  • keep compatibility-specific architecture and Make arguments in infinibench.common.constants
  • add focused documentation and unit tests
  • leave Hygon and Moore Threads unconfigured for follow-up support instead of classifying them as unsupported

Review fixes

  • run samples from the executable directory so companion kernels and data files resolve correctly
  • enforce the requested architecture at the generated CMake target level
  • exclude CMake aggregation manifests and parent-dependent libNVVM children from standalone sample counts
  • reject empty sample filters before metric calculation
  • preserve the DTK/Hygon-specific marker requirement when detecting hipcc

CoreX architecture fix

  • target the BI-V150/TG150 on tianshu58 with ivcore11
  • use ivcore11 consistently in CUDA Samples compile/link arguments and the hardware benchmark CMake build
  • add a regression test that locks the CoreX default and compile/link flags to ivcore11
  • document how to override sms and make_args together for other Iluvatar architectures

The previous invalid device function failures were caused by compiling TG150 kernels for ivcore20. Rebuilding the same workloads for ivcore11 resolves the runtime failures.

Validation

  • python -m pytest -q: 81 passed
  • black --check . with Black 23.9.1: passed
  • flake8 .: passed
  • python -m compileall -q infinibench tests: passed
  • git diff --check: passed
  • bash -n infinibench/hardware/cuda-memory-benchmark/build.sh: passed
  • pinned CUDA Samples 7b601789: 193 standalone projects discovered; no Tegra aggregate or parent-dependent libNVVM children included

Hardware results

  • MetaX C550: clock, matrixMul, and vectorAdd compiled and ran successfully (3/3)
  • Tianshu BI-V150/TG150 with ivcore11:
    • clock, matrixMul, and vectorAdd compiled successfully (3/3)
    • all three samples ran successfully (3/3)
    • hardware STREAM passed: Copy 540.94 GB/s, Scale 480.91 GB/s, Add 302.73 GB/s, Triad 295.57 GB/s
    • GPU 0 had no compute process before or after validation

This remains a draft for final review.

@baominghelly
baominghelly force-pushed the compatibility_adapter_only branch from 0d30442 to c197b8b Compare August 6, 2026 16:06
@baominghelly
baominghelly force-pushed the compatibility_adapter_only branch from c197b8b to 60cc809 Compare August 8, 2026 14:12
@baominghelly
baominghelly marked this pull request as ready for review August 10, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant